3.9.44 \(\int \frac {\sec ^2(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx\) [844]

3.9.44.1 Optimal result
3.9.44.2 Mathematica [A] (verified)
3.9.44.3 Rubi [A] (verified)
3.9.44.4 Maple [C] (verified)
3.9.44.5 Fricas [A] (verification not implemented)
3.9.44.6 Sympy [F]
3.9.44.7 Maxima [B] (verification not implemented)
3.9.44.8 Giac [A] (verification not implemented)
3.9.44.9 Mupad [B] (verification not implemented)

3.9.44.1 Optimal result

Integrand size = 29, antiderivative size = 127 \[ \int \frac {\sec ^2(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=-\frac {\sec ^5(c+d x)}{5 a^3 d}+\frac {5 \sec ^7(c+d x)}{7 a^3 d}-\frac {4 \sec ^9(c+d x)}{9 a^3 d}+\frac {\tan ^3(c+d x)}{3 a^3 d}+\frac {6 \tan ^5(c+d x)}{5 a^3 d}+\frac {9 \tan ^7(c+d x)}{7 a^3 d}+\frac {4 \tan ^9(c+d x)}{9 a^3 d} \]

output
-1/5*sec(d*x+c)^5/a^3/d+5/7*sec(d*x+c)^7/a^3/d-4/9*sec(d*x+c)^9/a^3/d+1/3* 
tan(d*x+c)^3/a^3/d+6/5*tan(d*x+c)^5/a^3/d+9/7*tan(d*x+c)^7/a^3/d+4/9*tan(d 
*x+c)^9/a^3/d
 
3.9.44.2 Mathematica [A] (verified)

Time = 0.86 (sec) , antiderivative size = 185, normalized size of antiderivative = 1.46 \[ \int \frac {\sec ^2(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\frac {32256-9684 \cos (c+d x)-6912 \cos (2 (c+d x))-538 \cos (3 (c+d x))-3072 \cos (4 (c+d x))+1614 \cos (5 (c+d x))+256 \cos (6 (c+d x))+73728 \sin (c+d x)-7263 \sin (2 (c+d x))+512 \sin (3 (c+d x))-3228 \sin (4 (c+d x))-1536 \sin (5 (c+d x))+269 \sin (6 (c+d x))}{322560 d \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^3 \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^3 (a+a \sin (c+d x))^3} \]

input
Integrate[(Sec[c + d*x]^2*Tan[c + d*x]^2)/(a + a*Sin[c + d*x])^3,x]
 
output
(32256 - 9684*Cos[c + d*x] - 6912*Cos[2*(c + d*x)] - 538*Cos[3*(c + d*x)] 
- 3072*Cos[4*(c + d*x)] + 1614*Cos[5*(c + d*x)] + 256*Cos[6*(c + d*x)] + 7 
3728*Sin[c + d*x] - 7263*Sin[2*(c + d*x)] + 512*Sin[3*(c + d*x)] - 3228*Si 
n[4*(c + d*x)] - 1536*Sin[5*(c + d*x)] + 269*Sin[6*(c + d*x)])/(322560*d*( 
Cos[(c + d*x)/2] - Sin[(c + d*x)/2])^3*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2 
])^3*(a + a*Sin[c + d*x])^3)
 
3.9.44.3 Rubi [A] (verified)

Time = 0.60 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.03, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {3042, 3354, 3042, 3352, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\tan ^2(c+d x) \sec ^2(c+d x)}{(a \sin (c+d x)+a)^3} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sin (c+d x)^2}{\cos (c+d x)^4 (a \sin (c+d x)+a)^3}dx\)

\(\Big \downarrow \) 3354

\(\displaystyle \frac {\int \sec ^8(c+d x) (a-a \sin (c+d x))^3 \tan ^2(c+d x)dx}{a^6}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {\sin (c+d x)^2 (a-a \sin (c+d x))^3}{\cos (c+d x)^{10}}dx}{a^6}\)

\(\Big \downarrow \) 3352

\(\displaystyle \frac {\int \left (a^3 \tan ^2(c+d x) \sec ^8(c+d x)-3 a^3 \tan ^3(c+d x) \sec ^7(c+d x)+3 a^3 \tan ^4(c+d x) \sec ^6(c+d x)-a^3 \tan ^5(c+d x) \sec ^5(c+d x)\right )dx}{a^6}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {4 a^3 \tan ^9(c+d x)}{9 d}+\frac {9 a^3 \tan ^7(c+d x)}{7 d}+\frac {6 a^3 \tan ^5(c+d x)}{5 d}+\frac {a^3 \tan ^3(c+d x)}{3 d}-\frac {4 a^3 \sec ^9(c+d x)}{9 d}+\frac {5 a^3 \sec ^7(c+d x)}{7 d}-\frac {a^3 \sec ^5(c+d x)}{5 d}}{a^6}\)

input
Int[(Sec[c + d*x]^2*Tan[c + d*x]^2)/(a + a*Sin[c + d*x])^3,x]
 
output
(-1/5*(a^3*Sec[c + d*x]^5)/d + (5*a^3*Sec[c + d*x]^7)/(7*d) - (4*a^3*Sec[c 
 + d*x]^9)/(9*d) + (a^3*Tan[c + d*x]^3)/(3*d) + (6*a^3*Tan[c + d*x]^5)/(5* 
d) + (9*a^3*Tan[c + d*x]^7)/(7*d) + (4*a^3*Tan[c + d*x]^9)/(9*d))/a^6
 

3.9.44.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3352
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n 
_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Int[ExpandTrig 
[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x] /; F 
reeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]
 

rule 3354
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n 
_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(a/g)^(2* 
m)   Int[(g*Cos[e + f*x])^(2*m + p)*((d*Sin[e + f*x])^n/(a - b*Sin[e + f*x] 
)^m), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && 
ILtQ[m, 0]
 
3.9.44.4 Maple [C] (verified)

Result contains complex when optimal does not.

Time = 0.67 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.94

method result size
risch \(-\frac {16 \left (-162 \,{\mathrm e}^{5 i \left (d x +c \right )}+6 \,{\mathrm e}^{i \left (d x +c \right )}-2 \,{\mathrm e}^{3 i \left (d x +c \right )}+126 \,{\mathrm e}^{7 i \left (d x +c \right )}-27 i {\mathrm e}^{4 i \left (d x +c \right )}-12 i {\mathrm e}^{2 i \left (d x +c \right )}+126 i {\mathrm e}^{6 i \left (d x +c \right )}+i\right )}{315 \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{9} d \,a^{3}}\) \(120\)
parallelrisch \(\frac {-\frac {44}{315}-\frac {16 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{15}-\frac {928 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{315}-\frac {8 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{35}-\frac {48 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{35}-\frac {176 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{105}-\frac {88 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{105}-4 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {8 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}-\frac {32 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}}{d \,a^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{9}}\) \(152\)
derivativedivides \(\frac {-\frac {1}{24 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {3}{32 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {8}{9 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{9}}+\frac {4}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{8}}-\frac {60}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}+\frac {34}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}-\frac {99}{10 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {23}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {2}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {3}{32 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{d \,a^{3}}\) \(190\)
default \(\frac {-\frac {1}{24 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {3}{32 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {8}{9 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{9}}+\frac {4}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{8}}-\frac {60}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}+\frac {34}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}-\frac {99}{10 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {23}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {2}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {3}{32 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{d \,a^{3}}\) \(190\)
norman \(\frac {-\frac {16 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{15 d a}-\frac {44}{315 a d}-\frac {8 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d a}-\frac {4 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {32 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 d a}-\frac {48 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{35 d a}-\frac {88 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{105 d a}-\frac {176 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{105 d a}-\frac {928 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{315 d a}-\frac {8 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{35 d a}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{9} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3} a^{2}}\) \(209\)

input
int(sec(d*x+c)^4*sin(d*x+c)^2/(a+a*sin(d*x+c))^3,x,method=_RETURNVERBOSE)
 
output
-16/315*(-162*exp(5*I*(d*x+c))+6*exp(I*(d*x+c))-2*exp(3*I*(d*x+c))+126*exp 
(7*I*(d*x+c))-27*I*exp(4*I*(d*x+c))-12*I*exp(2*I*(d*x+c))+126*I*exp(6*I*(d 
*x+c))+I)/(exp(I*(d*x+c))-I)^3/(exp(I*(d*x+c))+I)^9/d/a^3
 
3.9.44.5 Fricas [A] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.02 \[ \int \frac {\sec ^2(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=-\frac {8 \, \cos \left (d x + c\right )^{6} - 36 \, \cos \left (d x + c\right )^{4} + 15 \, \cos \left (d x + c\right )^{2} - 2 \, {\left (12 \, \cos \left (d x + c\right )^{4} - 10 \, \cos \left (d x + c\right )^{2} - 35\right )} \sin \left (d x + c\right ) + 35}{315 \, {\left (3 \, a^{3} d \cos \left (d x + c\right )^{5} - 4 \, a^{3} d \cos \left (d x + c\right )^{3} + {\left (a^{3} d \cos \left (d x + c\right )^{5} - 4 \, a^{3} d \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )\right )}} \]

input
integrate(sec(d*x+c)^4*sin(d*x+c)^2/(a+a*sin(d*x+c))^3,x, algorithm="frica 
s")
 
output
-1/315*(8*cos(d*x + c)^6 - 36*cos(d*x + c)^4 + 15*cos(d*x + c)^2 - 2*(12*c 
os(d*x + c)^4 - 10*cos(d*x + c)^2 - 35)*sin(d*x + c) + 35)/(3*a^3*d*cos(d* 
x + c)^5 - 4*a^3*d*cos(d*x + c)^3 + (a^3*d*cos(d*x + c)^5 - 4*a^3*d*cos(d* 
x + c)^3)*sin(d*x + c))
 
3.9.44.6 Sympy [F]

\[ \int \frac {\sec ^2(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\frac {\int \frac {\sin ^{2}{\left (c + d x \right )} \sec ^{4}{\left (c + d x \right )}}{\sin ^{3}{\left (c + d x \right )} + 3 \sin ^{2}{\left (c + d x \right )} + 3 \sin {\left (c + d x \right )} + 1}\, dx}{a^{3}} \]

input
integrate(sec(d*x+c)**4*sin(d*x+c)**2/(a+a*sin(d*x+c))**3,x)
 
output
Integral(sin(c + d*x)**2*sec(c + d*x)**4/(sin(c + d*x)**3 + 3*sin(c + d*x) 
**2 + 3*sin(c + d*x) + 1), x)/a**3
 
3.9.44.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 442 vs. \(2 (113) = 226\).

Time = 0.39 (sec) , antiderivative size = 442, normalized size of antiderivative = 3.48 \[ \int \frac {\sec ^2(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\frac {4 \, {\left (\frac {66 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {132 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {232 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {18 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {108 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {84 \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {504 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} + \frac {315 \, \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} + \frac {210 \, \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}} + 11\right )}}{315 \, {\left (a^{3} + \frac {6 \, a^{3} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {12 \, a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {2 \, a^{3} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {27 \, a^{3} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {36 \, a^{3} \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {36 \, a^{3} \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} + \frac {27 \, a^{3} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} - \frac {2 \, a^{3} \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}} - \frac {12 \, a^{3} \sin \left (d x + c\right )^{10}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{10}} - \frac {6 \, a^{3} \sin \left (d x + c\right )^{11}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{11}} - \frac {a^{3} \sin \left (d x + c\right )^{12}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{12}}\right )} d} \]

input
integrate(sec(d*x+c)^4*sin(d*x+c)^2/(a+a*sin(d*x+c))^3,x, algorithm="maxim 
a")
 
output
4/315*(66*sin(d*x + c)/(cos(d*x + c) + 1) + 132*sin(d*x + c)^2/(cos(d*x + 
c) + 1)^2 + 232*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 18*sin(d*x + c)^4/(c 
os(d*x + c) + 1)^4 + 108*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 84*sin(d*x 
+ c)^6/(cos(d*x + c) + 1)^6 + 504*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 + 31 
5*sin(d*x + c)^8/(cos(d*x + c) + 1)^8 + 210*sin(d*x + c)^9/(cos(d*x + c) + 
 1)^9 + 11)/((a^3 + 6*a^3*sin(d*x + c)/(cos(d*x + c) + 1) + 12*a^3*sin(d*x 
 + c)^2/(cos(d*x + c) + 1)^2 + 2*a^3*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 - 
 27*a^3*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 - 36*a^3*sin(d*x + c)^5/(cos(d 
*x + c) + 1)^5 + 36*a^3*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 + 27*a^3*sin(d 
*x + c)^8/(cos(d*x + c) + 1)^8 - 2*a^3*sin(d*x + c)^9/(cos(d*x + c) + 1)^9 
 - 12*a^3*sin(d*x + c)^10/(cos(d*x + c) + 1)^10 - 6*a^3*sin(d*x + c)^11/(c 
os(d*x + c) + 1)^11 - a^3*sin(d*x + c)^12/(cos(d*x + c) + 1)^12)*d)
 
3.9.44.8 Giac [A] (verification not implemented)

Time = 0.39 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.35 \[ \int \frac {\sec ^2(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=-\frac {\frac {105 \, {\left (9 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 12 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 7\right )}}{a^{3} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{3}} - \frac {945 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} + 10080 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 23940 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 42840 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 41958 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 32592 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 14148 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 5112 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 673}{a^{3} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{9}}}{10080 \, d} \]

input
integrate(sec(d*x+c)^4*sin(d*x+c)^2/(a+a*sin(d*x+c))^3,x, algorithm="giac" 
)
 
output
-1/10080*(105*(9*tan(1/2*d*x + 1/2*c)^2 - 12*tan(1/2*d*x + 1/2*c) + 7)/(a^ 
3*(tan(1/2*d*x + 1/2*c) - 1)^3) - (945*tan(1/2*d*x + 1/2*c)^8 + 10080*tan( 
1/2*d*x + 1/2*c)^7 + 23940*tan(1/2*d*x + 1/2*c)^6 + 42840*tan(1/2*d*x + 1/ 
2*c)^5 + 41958*tan(1/2*d*x + 1/2*c)^4 + 32592*tan(1/2*d*x + 1/2*c)^3 + 141 
48*tan(1/2*d*x + 1/2*c)^2 + 5112*tan(1/2*d*x + 1/2*c) + 673)/(a^3*(tan(1/2 
*d*x + 1/2*c) + 1)^9))/d
 
3.9.44.9 Mupad [B] (verification not implemented)

Time = 17.37 (sec) , antiderivative size = 279, normalized size of antiderivative = 2.20 \[ \int \frac {\sec ^2(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\frac {\frac {44\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}}{315}+\frac {88\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{105}+\frac {176\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{105}+\frac {928\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{315}+\frac {8\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{35}+\frac {48\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{35}+\frac {16\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{15}+\frac {32\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{5}+4\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+\frac {8\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{3}}{a^3\,d\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^3\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^9} \]

input
int(sin(c + d*x)^2/(cos(c + d*x)^4*(a + a*sin(c + d*x))^3),x)
 
output
((44*cos(c/2 + (d*x)/2)^12)/315 + (88*cos(c/2 + (d*x)/2)^11*sin(c/2 + (d*x 
)/2))/105 + (8*cos(c/2 + (d*x)/2)^3*sin(c/2 + (d*x)/2)^9)/3 + 4*cos(c/2 + 
(d*x)/2)^4*sin(c/2 + (d*x)/2)^8 + (32*cos(c/2 + (d*x)/2)^5*sin(c/2 + (d*x) 
/2)^7)/5 + (16*cos(c/2 + (d*x)/2)^6*sin(c/2 + (d*x)/2)^6)/15 + (48*cos(c/2 
 + (d*x)/2)^7*sin(c/2 + (d*x)/2)^5)/35 + (8*cos(c/2 + (d*x)/2)^8*sin(c/2 + 
 (d*x)/2)^4)/35 + (928*cos(c/2 + (d*x)/2)^9*sin(c/2 + (d*x)/2)^3)/315 + (1 
76*cos(c/2 + (d*x)/2)^10*sin(c/2 + (d*x)/2)^2)/105)/(a^3*d*(cos(c/2 + (d*x 
)/2) - sin(c/2 + (d*x)/2))^3*(cos(c/2 + (d*x)/2) + sin(c/2 + (d*x)/2))^9)